package com.zhuchaofan.zsbback.mapper;


import com.zhuchaofan.zsbback.entity.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;






@Mapper
public interface BookMapper {
    @Select({"<script>",
            "select * from t_book",
            "<where>",
            "  <if test=\"name != null and name != ''\">",
            "     name like #{name}",
            "  </if>",
            "</where>",
            "</script>"})
    List<Book> findAll(@Param("name") String name);
}
